package top.wilsonlv.jaguar.cloud.upms.controller.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import top.wilsonlv.jaguar.commons.web.base.BaseDTO;

import java.util.Set;

/**
 * @author lvws
 * @since 2021/7/26
 */
@Data
@ApiModel
@EqualsAndHashCode(callSuper = true)
public class OAuthClientCreateDTO extends BaseDTO implements OAuthClientBaseDTO {

    @ApiModelProperty(value = "客户端ID", required = true)
    private String clientId;

    @ApiModelProperty(value = "是否第三方", required = true)
    private Boolean thirdParty;

    @ApiModelProperty(value = "授权类型", required = true)
    private Set<String> authorizedGrantTypes;

    @ApiModelProperty(value = "accessToken有效期", required = true)
    private Integer accessTokenValiditySeconds;

    @ApiModelProperty(value = "refreshToken有效期", required = true)
    private Integer refreshTokenValiditySeconds;


    @ApiModelProperty(value = "授权范围", required = true)
    private Set<String> scope;

    @ApiModelProperty("自动授权")
    private Set<String> autoApproveScopes;

    @ApiModelProperty(value = "资源ID", required = true)
    private Set<String> resourceIds;

    @ApiModelProperty("重定向URI")
    private Set<String> registeredRedirectUri;

    @ApiModelProperty(value = "是否启用", required = true)
    private Boolean enable;

}
